package sw.mylife;

import sw.mylife.db.StorageControl;
import sw.mylife.system.MyLog;
import sw.mylife.system.Skillbook;
import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;

public class SyncService extends Service{
	private final String LOGTAG = "SyncService";
	private final IBinder mBinder = new MyBinder();
	
	
	@Override
	public int onStartCommand(Intent intent, int flags, int startId){
		//TODO Service Routine
		MyLog.i(LOGTAG, "SyncService Routine wurde gestartet...");
		
		Skillbook sb = Skillbook.getMySB();
		sb.loadWorkingSet();
		
		return Service.START_STICKY;
	}
	
	@Override
	public IBinder onBind(Intent arg0) {
		return mBinder;
	}
	//Additional Classes---- e.g. Binder-------------------
	public class MyBinder extends Binder{
		SyncService getService(){
			return SyncService.this; //TODO was bedeutet diese Zeile ?
		}
	}
	
	
}

